// import { createStore, combineReducers } from "redux"

// // 引入 需要的reducer
// import index from "./index/reducer"
// import num from "./login/reducer.js"

// const reducer = combineReducers({
//     wotule : index ,
//     one : num
// })
// export default createStore(reducer)


import {createStore , combineReducers} from 'redux'
import {persistStore, persistReducer} from 'redux-persist';
import storage from 'redux-persist/lib/storage';
import autoMergeLevel2 from 'redux-persist/lib/stateReconciler/autoMergeLevel2';

import user from './login/reducer'
import token from './login/reduer'
import input from "./input/reducer"
import citylist from "./citylist/reducer"

const persistConfig = {
    key: 'root',
    storage: storage,
    stateReconciler: autoMergeLevel2 // 查看 'Merge Process' 部分的具体情况
};

const reducer = combineReducers({
    citylist,
    // wotule : index ,
    user,
    token,
    input
})


const myPersistReducer = persistReducer(persistConfig, reducer)

const store = createStore(myPersistReducer)

export const persistor = persistStore(store)
export default store




